package string;

/**
 *
 */
public class StringDemo {
    public static void main(String[] args) {
      String a="1323dd";
      String b="1323dd";
      String e="1323dd";
      String c=new String("1323dd");
        System.out.println(a==b);//==String类型比较的是地址是否相同
        System.out.println(a==e);
        System.out.println(a==c);

        String j="123abc";
        String j1="123";
        String j2="abc";
        String j3=j1+"abc";
        System.out.println(j==j3);
        System.out.println(j==j1+j2);
        System.out.println(j=="123"+"abc");
        System.out.println(j.equals(j3));
    }
}
